Page({
  data: {
    itemOne: {
      key: "头像",
      value: "/assets/img/userImg.png"
    },
    itemTwo: {
      key: "所在地区",
      value: "浙江省"
    },
    itemThree: {
      key: "联系方式",
      value: "139"
    }
  },
  onLoad: function(options) {},


  onReady: function() {

  },

  onShow: function() {
    this.setUserInfo()
  },
  setUserInfo: function() {
    let userInfo = wx.getStorageSync("userInfo");
    let itemTwo = {
      ...this.data.itemTwo,
      value: userInfo.area || "请您选择您所在的地区"
    }
    let itemThree = {
      ...this.data.itemThree,
      value: userInfo.phone || "请您绑定您的联系方式"
    }
    this.setData({
      itemTwo,
      itemThree
    })
  },
  onToUpdatePhone: function() {
    wx.navigateTo({
      url: "/pages/u_updatePhone/u_updatePhone",
    })
  }
})